/**
 * @author Krzysztof Rozalski
 */

package hapi.sprite.sheet;

import flash.display.BitmapData;

class SpriteSheetBase {

	var source:BitmapData;
	var rows:Int;
	var cols:Int;
	public var width(default, null):Int;
	public var height(default, null):Int;
	var currentSpriteId:Int;
	public var totalFrames(default, null):Int;
	
	public function new(source, width:Int, height:Int) {
		this.source = source;
		this.width = width;
		this.height = height;
		this.rows = Math.floor(source.height / height);
		this.cols = Math.floor(source.width / width);
		this.totalFrames = rows * cols;
		this.currentSpriteId = 1;
	}
}